package com.gc.server.vo.up;


import com.gc.server.entity.LinkHeadEntity;
import lombok.Data;

import java.util.Date;

import com.alibaba.excel.annotation.*;

import java.io.Serializable;


import java.math.BigDecimal;

import com.gc.server.entity.LinkGoodsEntity;
import com.gc.server.vo.LinkGoodsVo;


/**
 * 连锁产品实体
 * 表名 link_goods
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Thu Oct 22 18:48:05 CST 2020
 */
@Data
public class LinkGoodsUp implements Serializable {
    @ExcelIgnore
    private static final long serialVersionUID = 1L;

    //
    @ExcelProperty("")
    private Long id;

    //总部ID
    @ExcelProperty("总部ID")
    private Long headId;

    //总部ID
    @ExcelProperty("总部编号")
    private String headCode;

    //产品名称
    @ExcelProperty("产品简称")
    private String name;

    //品牌
    @ExcelProperty("品牌")
    private String brand;

    //产品简称
    @ExcelProperty("产品名称")
    private String nick;

    //编号
    @ExcelProperty("编号")
    private String code;

    //规格
    @ExcelProperty("规格")
    private String spec;

    //型号
    @ExcelProperty("型号")
    private String type;

    //批准文号
    @ExcelProperty("批准文号")
    private String approvalNumber;

    //生产文号
    @ExcelProperty("生产文号")
    private String makeNumber;

    //零售价
    @ExcelProperty("零售价")
    private BigDecimal price;
    @ExcelProperty("积分")
    private BigDecimal point;

    @ExcelProperty("兑费")
    private BigDecimal money;

    //备注
    @ExcelProperty("备注")
    private String remark;


    public LinkGoodsUp() {

    }

    public LinkGoodsVo toVo() {

        LinkGoodsEntity entity = new LinkGoodsEntity();
        LinkGoodsVo vo = new LinkGoodsVo(entity);
        LinkHeadEntity headEntity = new LinkHeadEntity();
        headEntity.setCode(headCode);
        entity.setId(id);

        entity.setHeadId(headId);

        entity.setName(name);

        entity.setBrand(brand);

        entity.setNick(nick);

        entity.setCode(code);

        entity.setSpec(spec);

        entity.setType(type);

        entity.setApprovalNumber(approvalNumber);

        entity.setMakeNumber(makeNumber);

        entity.setPrice(price);

        entity.setPoint(point);

        entity.setMoney(money);

        entity.setRemark(remark);
        vo.setHead(headEntity);
        return vo;
    }


}
